package com.tong.controller;


import com.tong.entity.User;
import com.tong.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户 前端控制器
 * </p>
 *
 * @author tong
 * @since 2021-09-28
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("test")
    public String test(Integer id){

        userService.removeById(id);
        return "ok";
    }

    @GetMapping("test2")
    public void test2(){

        Integer count = userService.selectCount();

    }

}

